from transformers import AutoModelWithLMHead, AutoTokenizer, pipeline

model_name = 'liam168/trans-opus-mt-zh-en'

model = AutoModelWithLMHead.from_pretrained(model_name)

tokenizer = AutoTokenizer.from_pretrained(model_name)

translate = pipeline('translation_zh_to_en', model=model, tokenizer=tokenizer)

print(translate('我想要学习大模型相关的任务'))
